<?php
	//连接数据库
	include 'conn.php';
	
	//获取参数
	$id = $_GET['id'];
	$stuinfo['id'] = $_POST['id'];
	$stuinfo['email'] = $_POST['email'];
	$stuinfo['county'] = $_POST['county'];
	$stuinfo['uuid'] = $_POST['uuid'];
	$stuinfo['clas'] = $_POST['clas'];
	$stuinfo['name'] = $_POST['name'];
	$stuinfo['sex'] = $_POST['sex'];
	$stuinfo['age'] = $_POST['age'];
	$stuinfo['phone'] = $_POST['phone'];
	
	
	//SQL语句   UPDATE table_name SET field1=new-value1, field2=new-value2
	$sql = 'update stuinfo set email ="'.$stuinfo['email'].'",county ="'.$stuinfo['county'].'",uuid ="'.$stuinfo['uuid'].'",clas ="'.$stuinfo['clas'].'",name ="'.$stuinfo['name'].'", sex="'.$stuinfo['sex'].'",age='.$stuinfo['age'].',phone_number="'.$stuinfo['phone'].'" where id ="'.$stuinfo['id'].'"';

	




	//执行sql语句
	$result = mysqli_query($link,$sql);
	if(!$result){
		echo '0'; //执行失败
		die();
	}else {
		echo '1'; //执行成功
	}
	

?>